From 33b33f69a92edd970a109b0774ae09b70dcd2fcb Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 20 Feb 2006 00:57:48 +0000 Subject: [PATCH] Effectively revert my change from about a month ago. Windows/USB doesn't do timeouts (!) so the code was hanging on the device read... When debugging, show the various protocols used. --- gpsbabel/jeeps/gpsapp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gpsbabel/jeeps/gpsapp.c b/gpsbabel/jeeps/gpsapp.c index e428e895b..87c3387b4 100644 --- a/gpsbabel/jeeps/gpsapp.c +++ b/gpsbabel/jeeps/gpsapp.c @@ -264,6 +264,11 @@ static int32 GPS_A000(const char *port) if (rec->type == 0xfd) { GPS_A001(rec); +/* XXX This is wrong. Since we don't have a timeout on a read in Windows + * (!) and this phase of the protocol is one of the very rare ones where we + * don't know how many packets to expect, we have a big problem here. + */ +goto carry_on; } } fatal("Failed to find a product inquiry response.\n"); @@ -620,7 +625,14 @@ static void GPS_A001(GPS_PPacket packet) } } - GPS_User("\n"); + GPS_User("\nLink_type %d Device_command %d\n", + gps_link_type, gps_device_command); + GPS_User("Waypoint: Transfer %d Type %d\n", + gps_waypt_transfer, gps_waypt_type); + GPS_User("Route: Transfer %d Header %d Type %d\n", + gps_route_transfer, gps_rte_hdr_type, gps_rte_type); + GPS_User("Track: Transfer %d Type %d\n", + gps_trk_transfer, gps_trk_type); return; } -- 2.30.2